<template>
	<view class="address-write">
		<view class="address-list">
			<view class="address-item">
				<view class="item-left-icon">
					<image class="address-icon" src="../../static/sign/address.png"></image>
				</view>

				<view class="item-main">
					<view class="main-header">
						<view class="header-name">周杰伦</view>
						<view class="header-phone">13417370757</view>
						<view class="header-default">默认</view>
					</view>

					<view class="main-content">
						<view class="address-top">
							<view class="province">湖南省</view>
							<view class="city">长沙市</view>
							<view class="area">岳麓区</view>
							<view class="street">龙须糖街道</view>
						</view>
						<view class="address-bottom">劳动东路尊邸华庭3栋2003</view>
					</view>
				</view>

				<van-icon class="edit-icon" name="edit" />
			</view>

			<view class="address-item">
				<view class="item-left-icon">
					<image class="address-icon" src="../../static/sign/address.png"></image>
				</view>

				<view class="item-main">
					<view class="main-header">
						<view class="header-name">周杰伦</view>
						<view class="header-phone">13417370757</view>
					</view>

					<view class="main-content">
						<view class="address-top">
							<view class="province">湖南省</view>
							<view class="city">长沙市</view>
							<view class="area">岳麓区</view>
							<view class="street">龙须糖街道</view>
						</view>
						<view class="address-bottom">劳动东路尊邸华庭3栋2003</view>
					</view>
				</view>

				<van-icon class="edit-icon" name="edit" />
			</view>
		</view>

		<view class="height"></view>

		<view class="add-address-btn" @click.stop="goAddAddress">
			<van-icon class="add-icon" name="plus" />
			<text class="add-text">新增收货地址</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		methods: {
			goAddAddress() {
				uni.navigateTo({
					url: "/packageA/workbench/add-address"
				})
			},
		},
	}
</script>

<style lang="less">
	page {
		background-color: #f5f5f5;
	}

	.address-write {
		.address-list {
			margin: 0 20px;

			.address-item {
				margin-top: 15px;
				border-radius: 4px;
				display: flex;
				align-items: center;
				background-color: #fff;
				padding: 15px 20px;
				box-sizing: border-box;

				.item-left-icon {
					width: 34px;
					flex: 0 0 34px;
					height: 34px;

					.address-icon {
						width: 100%;
						height: 100%;
					}
				}

				.item-main {
					flex: 1;
					margin-left: 10px;

					.main-header {
						display: flex;
						align-items: center;

						.header-name {
							font-size: 16px;
							color: #000;
							font-weight: 500;
						}

						.header-phone {
							font-size: 12px;
							color: rgba(0, 0, 0, 0.7);
							margin-left: 10px;
						}

						.header-default {
							font-size: 11px;
							padding: 2px 4px;
							border-radius: 4px;
							color: #008aff;
							border: 1px solid #008aff;
							margin-left: 10px;
						}
					}

					.main-content {
						margin-top: 5px;

						.address-top {
							display: flex;
							align-items: center;
							font-size: 13px;
							color: rgba(0, 0, 0, 0.7);

							.province {}

							.city {
								margin-left: 5px;
							}

							.area {
								margin-left: 5px;
							}

							.street {
								margin-left: 5px;
							}
						}

						.address-bottom {
							font-size: 13px;
							color: rgba(0, 0, 0, 0.7);
							margin-top: 3px;
						}
					}
				}

				.edit-icon {
					font-size: 20px;
					flex: 0 0 20px;
					color: #4D4D4D;
					margin-left: 10px;
				}
			}
		}

		.height {
			height: 100px;
		}

		.add-address-btn {
			position: fixed;
			bottom: 40px;
			left: 20px;
			right: 20px;
			height: 44px;
			display: flex;
			align-items: center;
			justify-content: center;
			background-color: #008aff;

			.add-icon {
				font-size: 12px;
				color: #fff;
			}

			.add-text {
				font-size: 16px;
				color: #fff;
				margin-left: 3px;
			}
		}
	}
</style>
